﻿ 
<!DOCTYPE html>
<html>
<head>
    <meta charset="gb2312">
    <meta name="viewport" content="width=device-width" />
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" type="text/css" href="../css/sharestyle.css" />
    <script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../js/weixin.js"></script>
    <title>@ViewBag.title</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        a {
            text-decoration: none;
        }

        img {
            max-width: 100%;
            height: auto;
        }

        .weixin-tip {
            display: none;
            position: fixed;
            left: 0;
            top: 0;
            bottom: 0;
            background: rgba(0,0,0,0.8);
            filter: alpha(opacity=80);
            height: 100%;
            width: 100%;
            z-index: 100;
        }

            .weixin-tip p {
                text-align: center;
                margin-top: 10%;
                padding: 0 5%;
            }
    </style>
</head>
<body> 
    <img  src=@ViewBag.imgurl />
    <div class="down">

        <div class="down-left" style="">
            <img src="../Images/logo.png" />
            <div style=" float:left;"><h1 style="padding-top:4px; margin:0px; line-height:24px;">寐淘<br /> <font style="font-size:14px; line-height:24px; padding-top:0px; ">下载获取更多优惠</font></h1></div>
        </div>
        <div class="down-right" style="background-color: #95c32f; border-radius:5px;width:20%"  onclick="func()">
             下载  
          
        </div>
    </div>
    <div class="content">
        <p class="tit">@ViewBag.title</p>
        <p class="price">@ViewBag.prisour</p>

        @{
            @*var des = product.Description.Replace("|||", "|");
                var list = des.Split('|').ToList();
                for (int index = 0; index < list.Count; index++)
                {
                    <p class="tit des">@list[index]</p>
                }*@
        }

        <img src=@ViewBag.imgurl />
    </div>
    <div class="buybut" id=@ViewBag.url style="position:fixed; bottom:0" onclick="GoBuy()">
        查看详情
    </div>
    <div class="weixin-tip">
        <p>
            <img src="../Images/live_weixin.png" alt="微信打开" />
        </p>
    </div>
    <script type="text/javascript">
        var OSIndex;
        function zhezhao() {
            var u = navigator.userAgent;

            if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {
                OSIndex = 1;
            }
            else if (u.indexOf("iPhone")) {
                OSIndex = 2;
            }
            var winHeight = $(window).height();
            function is_weixin() {
                var ua = navigator.userAgent.toLowerCase();
                if (ua.match(/MicroMessenger/i) == "micromessenger") {
                    return true;
                } else {
                    return false;
                }
            }
            var isWeixin = is_weixin();
            if (isWeixin) {
                $(".weixin-tip").css("height", winHeight);
                $(".weixin-tip").show();
            }
        }
        //购买
        function GoBuy() {
            zhezhao()
            var plink = $(".buybut").attr("id")
            window.location.href = plink;
            var winHeight = $(window).height();
            function is_weixin() {

                var ua = navigator.userAgent.toLowerCase();
                if (ua.match(/MicroMessenger/i) == "micromessenger") {
                    return true;
                } else {
                    return false;
                }
            }
            var isWeixin = is_weixin();
            if (isWeixin) {
                $(".weixin-tip").css("height", winHeight);
                $(".weixin-tip").show();
            }
        }
        var func = function () {
            zhezhao()
            if (OSIndex == 1) {
                window.location.href = "http://www.maytao.cn/down/maytao.apk";
            }
            else {
                window.location.href = "http://www.maytao.cn/down/maytao.apk";
            }
            //else if (OSIndex == 2) {
            //    window.location.href = "http://itunes.apple.com/app/id1054877233";
            //}
            var winHeight = $(window).height();
            function is_weixin() {

                var ua = navigator.userAgent.toLowerCase();
                if (ua.match(/MicroMessenger/i) == "micromessenger") {
                    return true;
                } else {
                    return false;
                }
            }
            var isWeixin = is_weixin();
            if (isWeixin) {
                $(".weixin-tip").css("height", winHeight);
                $(".weixin-tip").show();
            }
        }

    </script>

</body>

</html>
